package com.liuqi.openai.core.chat;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * openai api /chat/completions 响应内容, choices 描述
 *
 * @author liuqi
 * @date 2025/7/18
 **/
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ChatCompletionChoice {

    /**
     * 索引
     */
    private Integer index;

    /**
     * 不管是流式还是非流式的响应, 最后都应该要把message进行构建
     */
    private Message message;

    /**
     * 流式 响应
     */
    private Delta delta;

    /**
     * finish_reason
     *
     * null、stop、length、tool_calls、content_filter
     */
    private String finishReason;

}
